package com.euond.accv.mdm.client.api;

import com.euond.accv.mdm.client.constant.Providers;
import com.euond.accv.mdm.client.dto.MdmCustomerDTO;
import com.euond.common.domain.search.Searchable;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

/**
 * Created by liqi on 2017/3/16.
 */
@FeignClient(name = Providers.MDM_API)
public interface MdmCustomerApi {

    @RequestMapping(value = "/accv-mdm-web/feign_api/mdm_customer/findCustomerByNo", method = RequestMethod.GET)
    public List<MdmCustomerDTO> findCustomerByNo(@RequestParam("customerNo") String customerNo);

    @RequestMapping(value = "/accv-mdm-web/feign_api/mdm_customer/findVOAll", method = RequestMethod.POST)
    public List<MdmCustomerDTO> findVOAll(@RequestBody Searchable searchable);

    /**
     * 查询所有：精灵数据;进行分页也进行排序
     */
    @RequestMapping(value = "/accv-mdm-web/feign_api/mdm_customer/findVO.json", method = RequestMethod.POST)
    public Map<String, Object> findVO(@RequestBody Searchable searchable);
}
